 <template>
  <div class="">
    <tops>图书商城 <button @click.stop="tiao">我的书架</button></tops>
    <div class="hiu"><input type="text" placeholder="查找内容" /></div>
    <lists />
  </div>
</template>

<script>
import tops from "../components/top";
import lists from "../components/list";
export default {
  data() {
    return {};
  },
  mounted() {
    this.$axios
      .get("data.json")
      .then((res) => {
        console.log(res);
        this.$store.commit("arr", res.data);
      })
      .catch((err) => {
        console.log(err);
      });
  },
  methods: {
    tiao() {
      this.$router.push({ path: "/about" });
    },
  },
  components: {
    tops,
    lists,
  },
};
</script>

<style lang='scss' scoped>
.hiu {
  height: 40px;
  line-height: 40px;
  width: 100%;
  background-color: #cfcfcf;
  text-align: left;
  input {
    width: 97%;
    height: 60%;
    border: none;
    background-color: #cfcfcf;
    padding-left: 15px;
  }
}
</style>
